package pl;
public class nodoToken extends Throwable {

    public String cadena;
    public int fila, columna;
    public String token;

    @Override
    public String toString() {
        String tornada = new String();
        if (token.equals("ERROR1")) {
            tornada = "Error 1 (" + fila + "," + columna + "): caracter '" + cadena + "' incorrecto";
        } else if (token.equals("ERROR2")) {
            tornada = "Error 2: fin de fichero inesperado";
        } else {
            tornada = token + " " + cadena + " " + fila + "," + columna;
        }
        return tornada;
    }
}
